This invention relates to computer-aided design (CAD) systems and in particular to a method and system for modifying the colors of a computer generated graphic image in such a CAD system.
In the field of computer-aided design, there is a need for a method and system for alternatingly applying different colors to a realistic computer generated graphic image without distorting the appearance of the image. With such a method and system, the user could immediately visualize the effect of color changes without requiring that a design be implemented in a three-dimensional object.
The appearance of a three-dimensional object is influenced by the effect of light on the object, which produces various shading of colors of the image such as creating shadows and highlighted areas. In order to faithfully reproduce the appearance of a three-dimensional object in a two-dimensional CAD system, the shading, highlights, reflections and other effects of lighting must be preserved.
Each color in an image may be represented by its (H,S,V) coordinates which represent the Hue, Saturation and Value of the color. Each coordinate may vary between zero and a maximum level. The Hue parameter or coordinate represents the variation between pure colors from red to yellow, to green, to cyan, to blue, to magenta, and finally back to red as its magnitude increases from zero to maximum. The Saturation parameter or coordinate corresponds to the quantity of white pigment in the color, with a decreasing level of S representing the addition of white pigment. The Value parameter or coordinate corresponds to the amount of black pigment added, with a decreasing Value level corresponding to additional black pigment. Additional information regarding the (H,S,V) color system is contained in Foley, J. D., Van Dam, A. "Fundamentals of Interactive Computer Graphics" (pgs. 611-616, Addison-Wesley, 1982), the disclosure of which is hereby incorporated herein by reference.
Colors in a computer-aided design system are represented by Scalar combinations of the combination of red, green and blue primary colors (R,G,B) coordinates. When a two-dimensional image of a three-dimensional object is generated in a CAD system, the shading, highlighting, reflections and other light effects are interpolated in the (R,G,B) coordinates. The darker the area, the smaller the (R,G,B) values and the lighter the area the larger the (R,G,B) values. In such a graphic image in a CAD system, literally hundreds of thousands of distinct (R,G,B) values may be present, distributed throughout the image.